Gamma correction is a well-known technique for controlling the luminance (brightness) of the display pixels produced by cathode ray tube (CRT) displays and the like. Generally, the actual luminance of each pixel on the display screen has a non-linear relationship with the corresponding pixel data, such as the digital pixel data output from the DVD decoder. For most CRT displays, this non-linear relationship is the power function xγ, in which x is the brightness of the given pixel defined by the pixel data, γ is the gamma value for the given display system, and xγ is the actual brightness of the pixel produced by the display system. Normally, the values of x correspond to analog display control voltages between (0) and one (1) volt, and therefore for a given value of x, the brightness of the corresponding pixel on the screen is typically too low. Gamma correction essentially corrects for the non-linearly in the conversion of the input pixel data into display pixels by applying the inverse function to the input data (i.e. x1/γ) in either software, hardware, or both hardware and software. As a result, the overall brightness of the display pixel, as well as the ratio between color components of that display pixel, is corrected relative to the input data.
The value of γ depends on the particular display system, as well as the lighting environment surrounding that display system during operation. Typically, the value of γ is between 1.4 and 3.5. The typical value of γ in the case of conventional display is 2.5, for an Apple Macintosh display, γ is taken to be 1.8, while the NTSC standard is based on a γ value of 2.2. Other systems, such as PAL and SECAM, assume a γ value of 2.8. High quality video products (encoders/decoders) often also require that the error between the output of the gamma correction circuit and the ideal output, be less than two (2) least significant bits (LSBs).
One widely-used gamma correction technique utilizes a look-up-table (LUT) in memory. In this case, gamma corrected values for all possible pixel data values from the corresponding data source are pre-computed and stored in the LUT. Each pixel value input from the data source indexes a gamma corrected output value in the LUT, which is then utilized to generate the corresponding pixel on the display system's display screen. The LUT approach, however, consumes a significant amount of memory space. Furthermore, the LUT must be re-programmed each time a different gamma value is required for driving a different display system.
In another LUT—based approach, difference values are calculated between the gamma corrected output values to the display system and the linear input values from the data source. These difference values are then stored in the LUT instead of the absolute gamma corrected output values discussed above. Since the dynamic range of the difference values is less than the dynamic range of the absolute values, the size of the LUT table is reduced. However, this second approach is still not memory efficient or easily programmable.
In a further gamma correction technique, a curve representing the gamma correction operation is approximated as piecewise linear line segments. The location of the knees or edges of each piecewise segment is fixed and the output value at the knee-points are programmed in a register bank. This approach introduces significant error, especially for lower luminescence values and also requires the re-programming of registers with pre-computed values to update the gamma correction curve.
Similarly, in one additional technique, a difference curve is approximated between the gamma corrected output values and the linear input values as piece-wise linear segments. The corresponding segment information including slope, intercept, and segment end points (knee-points) are stored in a LUT or register bank. This technique has improved error characteristics but still requires a significant amount of programming, after pre-computing the segment information, to change the gamma value.
In sum, new gamma correction circuits and methods are required, which support gamma correction in a wide range of systems and which provide ease of programmability, while at the same time minimize the introduction of error.